package com.liveinstars.im.metrics;


import com.onepiece.metrics.CustomMetricsEnum;
import com.onepiece.metrics.MetricsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @author: zhouze
 * @date: 2020/6/1
 */
@Component
public class NettyWatcherRegister {

//    @Value("${netty.server.name}")
//    private String serverName;
//
//    @Autowired
//    private MetricsService metricsService;
//
//    @PostConstruct
//    public void init(){
//        metricsService.gauge(CustomMetricsEnum.NETTY_DIRECT_MAX_MEMORY, new DirectMemoryMaxWatcher(), "name", serverName);
//        metricsService.gauge(CustomMetricsEnum.NETTY_DIRECT_USED_MEMORY, new DirectMemoryWatcher(), "name", serverName);
//        metricsService.gauge(CustomMetricsEnum.NETTY_ALIVE_CHANNEL, new ChannelWatcher(), "name", serverName);
//    }
}
